package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.pojo.vms.SkuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * Description:
 *
 * @author JourWon
 * @date Created on 2025/5/13
 */
@Mapper
public interface SkuDao extends BaseMapper<SkuEntity> {
    SkuEntity selectBySkuNameExcludeId(@NotBlank(message = "商品名称不能为空") @Size(max = 50, message = "商品名称长度不能超过50") @Param("skuName") String skuName, @Param("skuId") Long skuId);

    int updateSku(@Param("sku") SkuEntity sku);

    SkuEntity selectBySkuName(@Param("skuName") String skuName);
}
